Cache memory capable of selecting size thereof and processor chip having the same

ABSTRACT

A multi-way set-associative cache memory is configured to operate only with those ways of the tag and data memories that operate normally, and excludes those ways of the tag and data memories that are determined to be incurably defective. By reducing the size of the cache memory to exclude the defective cells, the present invention is capable of preventing scrapping or discarding of the entire high-priced processor chip in which CPU and cache memory are integrated into a single chip.

RELATED APPLICATION

[0001] This application relies for priority upon Korean Patent Application No. 2001-76262, filed on Dec. 4, 2001, the contents of which are herein incorporated by reference in their entirety.

FIELD OF THE INVENTION

[0002] The present invention relates to a semiconductor integrated circuit, and more particularly to a cache memory capable of selecting a size thereof and a processor chip having the same.

BACKGROUND OF THE INVENTION

[0003] When typical programs are analyzed, there is a tendency that a memory reference of a given time is conducted in a limited area of memory. This phenomenon is referred to as a “locality of reference,” which can be readily understood by the fact that a program loop and a subroutine are frequently used for typical computer programs and are sequentially processed. In addition, a memory reference to data is generally limited to one area of memory, which is applicable to a table-lookup process and a repeating process referring to a common memory and arrangement.

[0004] If a frequently referred to program segment and data are stored in a high-speed small-size memory, average memory access time is shortened, thereby reducing the processing time required for performing the program. Such a high-speed small-size memory is commonly referred to as a “cache memory.” In general, access time of a cache memory formed of SRAM (static random access memory) is 5-10 times as fast as that of a main memory formed of DRAM (dynamic random access memory). Cache is generally the fastest memory device in the hierarchy of memories and approximates to the speed of the CPU (central processing unit).

[0005] The basic operation of cache is as follows. When a CPU requires an access to memory, cache is first investigated. When a desired word is found in cache, the CPU reads out the word. When a desired word is not found in cache, the CPU accesses main memory for reading out the word. A block of the main memory that includes the word is transferred from the main memory to cache memory. A size of the block is commonly on the order of about 1-16 words.

[0006] The performance of a cache memory is measured according to “hit ratio”. When CPU refers to a memory and finds the desired word in cache, this process is referred to as a “hit.” However, when the CPU does not find the word in cache, but rather in a main memory, the process is referred to as a “miss.” The “hit rate” represents a ratio of the number of hits divided by the total number of memory references performed by CPU. The hit rate is experimentally measured by performing a typical program and calculating the number of hits and misses during a given time period. The hit ratio is generally greater than 0.9, which is to demonstrate the locality of a memory reference.

[0007] The basic characteristic of the cache memory is a rapid access time such that it takes little time to locate a word in cache. To transfer data from the main memory to the cache memory is referred to as a “mapping process,” which is divided into associative mapping, direct mapping, and set-associative mapping.

[0008] The cache memory adopting the associative mapping is the fastest and the most flexible. The associative memory stores an address and data of a memory word. An address of the CPU is stored in an argument register. The associative memory locates the same address as the address in the argument register, reads corresponding data, and sends the data to the CPU. If there does not arise a hit condition, the associative memory locates the word in a main memory and stores the address and data in the associative cache memory. If the cache memory is full, a pair of address and data should be replaced to store a necessary word that does not exist in the cache. The pair that is to be removed is determined by a replacement algorithm as selected by a designer.

[0009] In direct mapping, an address of the CPU is divided into an index field and a tag field. Each word of the cache memory is formed of a data word and a tag. If the CPU requests a reference of memory, the index field of a CPU address is used as an address for accessing the cache. Comparing the tag field of the CPU address with that of a word read out from the cache, if both are consistent, it is a hit condition representing that desired data is in the cache. Otherwise, it is a miss condition and a desired word is read out from the main memory. The word has a new tag and is stored in the cache. A disadvantage of the direct mapping is that if two or more words, which have the same index and different tags, repeatedly access, a hit rate may be markedly lowered.

[0010] The set-associative mapping is used to compensate for this weakness in direct mapping so that each word of the cache may store two or more memory words under the same index address. Each data word is stored together with a tag, and tag word items in a word constitute a single set.

[0011] Recently, with developments in semiconductor fabrication, CPUs and cache memories have been integrated in a single chip. FIG. 1 is a schematic diagram illustrating a configuration of a single processor chip 1 in which CPU 2 and a cache memory 3 are integrated. The processor chip 1 may comprise a CPU 2, or other types of processors such as DSPs (digital signal processors) or microprocessors. In the case where the cache memory and the CPU are embedded in a single chip, the number of data bits that are communicated between the CPU chip and the cache memory is highly increased in order to elevate the resulting input/output speed of data. As a result, the general performance of the CPU may be improved. However, because the embedded cache memory has a restriction on a size as compared to an external cache memory, its cache hit rate may be lowered. Accordingly, when cache memories are embedded in the CPU chip, a set size of a set-associative cache memory has been increased to compensate for reduction in the cache hit rate caused by downsizing.

[0012]FIG. 2 illustrates an example of a multi-way set-associative cache memory configuration, which is disclosed by Toshichika on Oct. 10, 2000 in U.S. Pat. No. 6,131,143 entitled “MULTI-WAY ASSOCIATIVE. STORAGE TYPE CACHE MEMORY.”

[0013] The cache memory illustrated in FIG. 2 is a 9-way set-associative cache memory. In FIG. 2, an address 10 supplied from the CPU 2 to an address bus is formed of a tag address 11 and a set address 12.

[0014] Referring to FIG. 2, the cache memory 3 comprises a decoder 20, 9 tag memories 30 a-30 i, valid bits 31 a-31 i, data memories 40 a-40 i, comparators 50 a-50 i, and a way selector 55.

[0015] The decoder 20 decodes the set address 12 of the address 10. The tag memories 30 a-30 i and the data memories 40 a-40 i include k lines (i.e., sets), and each of the sets stores data. The data memories 40 a-40 i supply the cache size selector 60 with data stored in the set selected by a set address decoded by the decoder 20. The valid bits 31 a-31 i represent whether or not the contents stored in corresponding data memories 30 a-30 i are valid, respectively. The way selector 55 selects one of or none of output data among the data memories 40 a-40 i in response to signals HITa-HITi that represent results of the comparators 50 a-50 i.

[0016] In FIG. 2, suffixes a and i of references, such as 30 a and 30 i representing the tag memories and 40 a and 40 i representing the data memories, represent ways a and b, respectively.

[0017] Next, the operation of the cache memory 3 will be explained.

[0018] When the address 10 is supplied from the CPU 2, the set address 12 is decoded by the decoder 20. The contents stored in the selected set address of the tag memories 30 a-30 i are supplied to the comparators 50 a-50 i, respectively. In addition, the contents stored in the selected set address of the data memories 40 a-40 i are supplied to the way selector 55.

[0019] When one of the comparators 50 a-50 i determines that the contents stored in the selected set address of the tag memories 30 a-30 i are consistent with the address tag 11 and corresponding valid bits 31 a, 31 b, . . . , or 31 i are active, a corresponding bit signal HITa, HITb, . . . , or HITi becomes active.

[0020] When there is present a way in which the contents stored in the selected set address of the tag memory 30 a, 30 b, . . . , or 30 i are identical with the tag address 11, data of the way is output from the way selector 55. When there is present no way in which the contents stored in the selected set address of the tag memory 30 a, 30 b, . . . , or 30 i are identical with the tag address 11, data stored in a main memory (not shown) rather than the cache memory is accessed by the CPU 2. In addition, the data in the main memory accessed by the CPU 2 is stored in the data memory 40 a, 40 b, . . . , or 40 i of the cache memory 3.

[0021] In the cache memory explained above, the tag memories 30 a-30 i and data memories 40 a-40 i are formed of a plurality of memory cells, and the cache memory further comprises redundant cells for replacing defective memory cells. Generally, the last step of manufacturing semiconductor integrated circuits is to test whether or not the manufactured semiconductor integrated circuit is defective. In the test step, if it is determined that a cache memory includes a defective memory cell, the memory cell is replaced by a redundant cell. However, because the number of the redundant cells is limited, when a defective cell cannot be replaced by a redundant cell, the integrated circuit should be scrapped or discarded.

[0022] In a processor chip in which CPU and a cache memory are integrated, if the cache memory includes defective cells that cannot be replaced by redundant cells, the processor chip must be scrapped or discarded. In general, CPU fabrication is expensive relative to fabrication of other semiconductor integrated circuits. Therefore, it is a substantial loss to scrap or discard the entire processor chip when several defective cells of the cache memory are present.

SUMMARY OF THE INVENTION

[0023] It is therefore a feature of the present invention to provide a processor chip having a cache memory capable of selecting size thereof.

[0024] It is another feature of the present invention to provide a processor chip having a multi-way set-associative cache memory that is capable of selecting and using only operational tag and data memories and excluding those tag and data memories having defective cells.

[0025] It is still another feature of the present invention to provide a cache memory capable of selecting size thereof.

[0026] The feature of the present invention may be achieved by a data processing system comprising a processor and a multi-way set-associative cache memory for storing data to be used by the processor. In particular, the cache memory includes a data memory being divided into a plurality of ways and for storing data to be used by the processor, a tag memory being divided into a plurality of ways and for storing a tag address, and a cache size selector for selecting for operation those ways of among the plurality of ways of the data memory and tag memory that are determined to function normally, and to exclude from operation those ways among the plurality of ways of the data memory and tag memory having defective memory cells, the number of ways of selected data memory being equal to the number of selected ways of tag memory.

[0027] In a preferred embodiment, the data processing system further comprises comparing means for respectively comparing a predetermined address from the processor with tag addresses stored in the selected ways of the tag memory and outputting hit signals respectively representing whether or not the predetermined address is identical with the tag address stored in each way of the tag memory. At this time, the cache size selector receives the hit signals from the selected ways of the tag memory and corresponds the hit signals to the selected ways of the data memory.

[0028] The cache size selector is configured with a first selection circuit for receiving hit signals corresponding to the selected ways of the tag memory among the hit signals and outputting a plurality of selection signals corresponding respectively to ways of the data memory, and a second selection circuit for supplying the processor with the data stored in one of the ways of the data memory according to the selection signals.

[0029] When all the hit signals indicate that the predetermined address is not identical with a tag address stored in a way of the tag memory, the second selection circuit supplies none of data stored in the data memory to the processor.

[0030] The first selection circuit includes a plurality of selection signal generating circuits corresponding respectively to the ways of the data memory and for selectively receiving one of the hit signals corresponding to the selected ways of the tag memory and outputting the selection signal for selecting a way of the data memory.

[0031] When a way corresponding to the data memory is selected, each of the selection signal generating circuits selectively receives one of the hit signals corresponding to the selected ways of the tag memory. When a way corresponding to the data memory is not selected, each of the selection signal generating circuits receives none of the hit signals and does not output the selection signal.

[0032] Meanwhile, each of the selection signal generating circuits comprises input terminals for receiving the hit signals corresponding to the selected ways of the tag memory, storing means for storing information as to whether or not one of or none of the hit signals are received from the comparing means, a decoder for decoding the information stored in the storing means to output decoding signals, and a selection signal generator for receiving one of the hit signals input via the input terminals to output the selected signals or for receiving none of the hit signals such that the selected signal is not output, in response to the decoding signals.

[0033] In this case, the storing means comprises at least one fuse. The number of the input terminals is a number obtained by adding 1 to a difference between the number of the maximum selectable ways and the number of the minimum selectable ways of the data and tag memories.

[0034] The other feature of the present invention can be achieved by a data processing system comprising a processor and a multi-way set-associative cache memory for storing data to be used by the processor. The cache memory comprises a data memory being divided into a plurality of ways and for storing data to be used by the processor. A tag memory is divided into a plurality of ways and stores a tag address. Comparing means compares a predetermined address from the processor with tag addresses stored in ways of the tag memory, respectively, and outputs hit signals that respectively represent whether or not the predetermined address is consistent with a tag address stored in each way of the tag memory. A cache memory size selection circuit selects for operation the hit signals corresponding to a portion of ways of the tag memory as well as a portion of ways of the data memory. The number of selected hit signals is equal to the number of selected ways of the data memory.

[0035] In the preferred embodiment, the cache memory size selection circuit respectively selects for operation those ways among the plurality of ways of the data memory and the tag memory that are determined to function normally, and excludes from operation those ways among the plurality of ways of the data memory and the tag memory having defective memory cells.

[0036] The cache memory size selection circuit further comprises a plurality of selection signal generating circuits corresponding respectively to ways of the data memory. A plurality of the selection signal generating circuits each receive one of the hit signals corresponding to the normally functioning ways of the tag memory and output a selection signal for selecting a corresponding way of the data memory. Also, the cache memory size selection circuit further comprises an output circuit for supplying the processor with data stored in a way of the data memory selected by the selection signals.

[0037] When all the hit signals indicate that the predetermined address is not consistent with the tag address stored in a way corresponding to the tag memory, the processor is supplied with none of data stored in the data memory.

[0038] The other feature of the present invention can be achieved by a multi-way set-associative cache memory comprising a data memory being divided into a plurality of ways and for storing data to be used by the processor. A cache size selects for operation those ways of among the plurality of ways of the data memory and tag memory that are determined to function normally, and excludes from operation those ways among the plurality of ways of the data memory and tag memory having defective memory cells, the number of ways of selected data memory being equal to the number of selected ways of tag memory.

[0039] The multi-way set-associative cache memory further comprises comparing means for respectively comparing a predetermined address from the processor with tag addresses stored in the selected ways of the tag memory and outputting hit signals that respectively represent whether or not the predetermined address is consistent with a tag address stored in each way of the tag memory. At this time, the cache size selector receives the hit signals from the selected ways of the tag memory and corresponds the hit signals to the selected ways of the data memory.

[0040] The other feature of the present invention can be achieved by a multi-way set-associative cache memory comprising a data memory being divided into a plurality of ways and for storing data to be used by a processor. A tag memory is divided into a plurality of ways and stores a tag address. Comparing means compares a predetermined address from the processor with tag addresses stored in ways of the tag memory, respectively, and outputs hit signals that respectively represent whether or not the predetermined address is consistent with a tag address stored in each way of the tag memory. A size selection circuit selects for operation the hit signals corresponding to a portion of the ways of the tag memory and a portion of the ways of the data memory, the number of selected hit signals being equal to the number of selected ways of the data memory.

BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The foregoing and other objects, features and advantages of the invention will be apparent from the more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.

[0042]FIG. 1 illustrates a processor chip in which CPU and a cache memory are integrated in a single chip;

[0043]FIG. 2 illustrates an example of a multi-way set-associative cache memory;

[0044]FIG. 3 is a multi-way set-associative cache memory according to a preferred embodiment of the present invention;

[0045]FIG. 4 is a block diagram of a cache size selector of FIG. 3 according to a preferred embodiment of the present invention;

[0046]FIG. 5 illustrates a detailed circuit configuration of the way selector of FIG. 4;

[0047]FIG. 6 illustrates a detailed circuit configuration of way selection signal generators of FIG. 5;

[0048]FIG. 7 illustrates a detailed circuit configuration of the fuse decoder of FIG. 5;

[0049]FIG. 8 illustrates decoding signals being activated according to a program state of fuses of FIG. 7;

[0050]FIG. 9A exemplarily illustrates signals being input/output into/from the way selector of FIG. 5, in the case where defective cells are present in 2 tag memories and 2 data memories, respectively, wherein the cache size is changed from 9-way set-associative cache memory to 7-way set-associative cache memory;

[0051]FIG. 9B illustrates a program state of each fuse of fuse decoders, states of decoding signals thereof, and a selected input terminal of each way selection signal generator according to the example of FIG. 9A;

[0052]FIG. 10A exemplarily illustrates signals input/output into/from the way selector of FIG. 5, in the case where defective cells are present in 5 tag memories and 5 data memories, respectively, and wherein the cache size is changed from 9-way set-associative cache memory to 4-way set-associative cache memory; and

[0053]FIG. 10B illustrates a program state of each fuse of fuse decoders, states of decoding signals thereof, and a selected input terminal of each way selection signal generator.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

[0054] The present invention will now be more fully described hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown.

[0055] A multi-way set-associative cache memory of the present invention may be operated with ways of operational tag and data memories, and excluding ways of tag and data memories with incurably defective cells. By changing the size of the resulting cache memory, the present invention prevents scrapping or discarding of the entire expensive processor chip in which CPU and a cache memory are integrated on a single chip due to several defective cells of the cache memory.

[0056]FIG. 3 is a multi-way set-associative cache memory according to a preferred embodiment of the present invention and FIG. 4 is a block diagram of a cache size selector 60 of FIG. 3.

[0057] Referring to FIG. 4, the cache size selector 60 comprises a way selector 61 and an output selection circuit 62. The way selector 61 receives hit signals corresponding to defective tag memories among 9 hit signals HITa-HITi supplied from comparators 50 a-50 i according to a programmed state of following embedded fuse circuits, and generates the input hit signals as way selection signals WSELa-WSELi. The output selection circuit 62 selects and generates one of, or none of, data DATAa-DATAi supplied from data memories 40 a-40 i in response to the way selection signals WSELa-WSELi from the way selector 61. The detailed circuit configurations and operations of the way selector 61 and output selection circuit 62 will be described hereinafter.

[0058]FIG. 5 illustrates a detailed circuit configuration of a way selector 61 of FIG. 4.

[0059] Referring to FIG. 5, the way selector 61 comprises 9 way selection signal generators 100 a-100 i corresponding respectively to data memories 40 a-40 i and 9 fuse decoders 200 a-200 i corresponding respectively to the way selection signal generators 100 a-100 i.

[0060] Each of the way selection signal generators 100 a-100 i has 6 input terminals IN1-IN6 and a single output terminal OUT. Each way selection signal generator selects one of hit signals input from input terminals IN1-IN6 in response to decoding signals D1-D6 supplied from a corresponding fuse decoder 200 a, 200 b, . . . , or 200 i, and outputs the selected hit signal as a way selection signal WSEL0 or outputs a way selection signal WSEL0 at a low level.

[0061] The way selector 61 is provided such that if there is present a tag memory or data memory with defective cells among 9 ways of the cache memory 1000, normal operational memories excluding the tag memory or data memory with the defective cells are used. In particular, the way selector 61 of FIG. 5 is operated to use the cache memory 1000 as at least 4-way set-associative cache memory, when at most 5 tag memories of 9 tag memories 30 a-30 i and at most 5 data memories of 9 data memories are unavailable due to defective cells.

[0062] The number of input terminals of the way selection signal generators 100 a-100 i is calculated by the following Equation 1. $\begin{matrix} {\left( \text{~~~~~~~THE NUMBER OF INPUT TERMINALS OF WAY SELECTION SIGNAL GENERATOR} \right) = {\left( \text{THE GREATEST WAY NUMBER ~~~~~~~~~~OF CASH MEMORIES} \right) - \left( \text{THE LEAST WAY NUMBER  ~~~~~~OF CASH MEMORIES} \right) + 1}} & \left\lbrack {{Equation}\quad 1} \right\rbrack \end{matrix}$

[0063] Here, “the greatest way number of cache memories” represents the total number of ways included in the cache memory 1000. At this time, there are not present defective cells, which cannot be replaced by remnant cells, in tag memories and data memories. In addition, “the least way number of cache memories” represents the least number of ways that can operate the cache memory 1000 using only non-defective tag memories and data memories even if there are present several defective cells in the tag memories and data memories included in the cache memory 1000.

[0064] In the present invention, a cache memory of which greatest way number is 9 and least way number is 4 will be explained as the preferred embodiment. However, the principles of the present invention are equally applicable to other cache size configurations. In this case, since the number of input terminals of each of way selection signal generators 100 a-100 i is (9-4+1), or 6, each way selection signal generator has 6 input terminals IN1-IN6. Different hit signals are input into the 6 input terminals IN1-IN6 included in a single way selection signal generator 100 a, 100 b, . . . , or 100 i. With respect to the example of FIG. 5, hit signals HITa, HITe, HITf, HITg, HITh, and HITi are respectively input in the input terminals IN1-IN6 of the way selection signal generator 100 a, hit signals HITb, HITa, HITf, HITg, HITh, and HITi are respectively input in the input terminals of the way selection signal generator 100 b, hit signals HITc, HITa, HITb, HITg, HITh, and HITi are respectively input in the input terminals of the way selection signal generator 100 c, hit signals HITd, HITa, HITb, HITc, HITh, and HITi are respectively input in the input terminals of the way selection signal generator 100 d, hit signals HITe, HITa, HITb, HITc, HITd, and HITi are respectively input in the input terminals of the way selection signal generator 100 e, hit signals HITf, HITa, HITb, HITc, HITd, and HITe are respectively input in the input terminals of the way selection signal generator 100 f, hit signals HITg, HITb, HITc, HITd, HITe, and HITf are respectively input in the input terminals of the way selection signal generator 100 g, hit signals HITh, HITc, HITd, HITe, HITf, and HITg are respectively input in the input terminals of the way selection signal generator 100 h, and hit signals HITi, HITd, HITe, HITf, HITg, and HITh are respectively input in the input terminals IN1-IN6 of the way selection signal generator 100 i.

[0065] Each of the hit signals HITa-HITi output from the comparators 50 a-50 i is input into the 6 way selection signal generators 100 a-100 i. The way selector 61 of FIG. 5 shows that the hit signals HITa-HITi are input into the way selection signal generators 100 a-100 i according to the most preferred method. However, the way selector 61 is capable of a number of different configurations for connecting the hit signals HITa-HITI to input terminals IN1-IN6 of each of the way selection signal generators 100 a-100 i.

[0066] Referring to FIGS. 6 and 7, detailed circuit configurations and operations of the way selection signal generators 100 a-100 i and the fuse decoders 200 a-200 i will be explained. FIG. 6 illustrates the detailed circuit configuration of the way selection signal generator 100 a of FIG. 5, and FIG. 7 illustrates the detailed circuit configuration of the fuse decoder 200 a of FIG. 5. The other way selection signal generators 100 b-100 i have the same circuit configuration as the way selection signal generator 100 a, and the other fuse decoders 200 b-200 i have the same circuit configuration as the fuse decoder 200 a.

[0067] To begin with, referring to FIG. 6, the way selection signal generator 10 comprises transmission gates 111-161 and inverters 112-162, which respectively correspond to input terminals IN1-IN6, a transmission gate 171, an inverter 172, and a NOR gate 173. The inverter 112 has an input terminal for receiving a decoding signal D1 supplied from the decoder 200 a as well as an output terminal. The transmission gate 111 is formed of an NMOS transistor and a PMOS transistor, and current paths of transistors are formed between the input and output terminals IN1 and OUT. A gate of the PMOS transistor is coupled to an output terminal of the inverter 112, and a gate of the NMOS transistor is coupled to the decoding signal D1. Therefore, when the decoding signal D1 is at a high level (i.e. logic ‘1’), a signal input via the input terminal IN1 is transferred to the output terminal OUT.

[0068] Similarly to the coupled of the transmission gate 111 and the inverter 112, the other transmission gates 121-161 and inverters 122-162 are likewise coupled to each other. Thus, the way selection signal generator 100 a outputs a signal to the output terminal OUT, which is input via the input terminal IN1, IN2, . . . , or IN6 corresponding to the decoding signal that is a high level among the decoding signals D1-D6.

[0069] The NOR gate 173 receives the decoding signals D1-D6. The inverter 172 has an input terminal for receiving an output signal from the NOR gate 173 as well as an output terminal. The transmission gate 171 is formed of an NMOS transistor and a PMOS transistor, and current paths of transistors are formed between a ground voltage and the output terminal OUT. A gate of the PMOS transistor is coupled to the output terminal of the inverter 172, and a gate of the NMOS transistor is coupled to the output terminal of the NOR gate 173. Therefore, when all the decoding signals D1-D6 are at a low level (i.e. logic ‘0’), the output terminal OUT is coupled to the ground voltage.

[0070] Referring to FIG. 7, the fuse decoder 200 a comprises fuses F1, F2, and F3, PMOS transistors 211-213, inverters 221-223, and AND gates 231-236. The fuse F1 has one end coupled to the ground voltage and the other end coupled to a first node N1. The PMOS transistor 211 has a current path formed between the ground voltage and the first node N1 as well as a gate coupled to the ground voltage. The inverter 221 has an input terminal coupled to the first node N1 and an output terminal. The fuse F2 has one end coupled to the ground voltage and the other end coupled to a second node N2. The PMOS transistor 212 has a current path formed between a power supply voltage and the second node N2 as well as a gate coupled to the ground voltage. The inverter 222 has an input terminal coupled to the second node N2 and an output terminal. The fuse F3 has one end coupled to the ground voltage and the other end coupled to a third node N3. The PMOS transistor 213 has a current path formed between the power supply voltage and the third node N3 as well as a gate coupled to the ground voltage. The inverter 223 has an input terminal coupled to the third node N3 and an output terminal.

[0071] The AND gate 231 includes input terminals being respectively connected to output terminals of the inverters 221, 222, and 223 as well as an output terminal for outputting the decoding signal D1. The AND gate 232 includes input terminals being respectively connected to output terminals of the inverters 221 and 222 and the third node N3 as well as an output terminal for outputting the decoding signal D2. The AND gate 233 includes input terminals being respectively connected to the output terminals of the inverters 221 and 223 and the second node N2 as well as an output terminal for outputting the decoding signal D3. The AND gate 234 includes input terminals being respectively connected to the output terminal of the inverter 221 and the second and third nodes N2 and N3 as well as an output terminal for outputting the decoding signal D3. The AND gate 235 includes input terminals being respectively connected to the output terminals of the inverters 222 and 223 as well as an output terminal for outputting the decoding signal D5. Also, the AND gate 236 has input terminals being respectively connected to the first and third nodes N1 and N3 and the output terminal of the inverter 222 as well as an output terminal for outputting the decoding signal D6.

[0072] The fuse decoder 200 a having the foregoing configuration activates only one of the decoding signals D1-D6 at a high level or inactivates all the decoding signals D1-D6 at a low level according to whether or not the fuses F1, F2, and F3 are cut.

[0073]FIG. 8 shows decoding signals activated among the decoding signals D1-D6 output from the AND gates 231-236 according to program states (i.e. cutting or not) of the fuses F1, F2, and F3 of FIG. 7. In FIG. 8, ‘1’ represents that fuses are cut, and ‘0’ represents that fuses are not cut.

[0074] Referring to FIGS. 7 and 8, for example, when all the fuses F1, F2, and F3 are not cut, a current path is formed between the power supply voltage and the ground voltage via each of the fuses F1, F2, and F3 such that the first, second, and third nodes N1, N2, and N3 all go to a low level. As a result, only the decoding signal D1 output from the AND gate 231 is activated at a high level while decoding signals D2-D6 output from the other AND gates 232-236 are inactivated at a low level. For another example, if only the fuse F3 is cut and the other fuses F1 and F2 are not cut, the third node N3 coupled to the cut fuse F3 goes to a high level by the PMOS transistor 212, and the first and second nodes N1 and N2 coupled to the other fuses F1 and F2 go to a low level.

[0075] As a result, only the decoding signal D2 output from the AND gate 232 is activated at a high level while the decoding signals D1 and D3-D6 output from the other AND gates 231 and 233-236 are inactivated at a low level. If all the fuses F1, F2, and F3 are cut or the fuses F1 and F2 are cut, all the decoding signals D1-D6 output from the AND gates 231-236 are inactivated at a low level.

[0076] If the fuses included in each of the fuse decoders 200 a-200 i of FIG. 5 are programmed as explained above, the size of the cache memory may be selected. A method for selecting a size of the cache memory will be explained in more detail hereinafter.

[0077]FIG. 9A exemplarily illustrates a method for selecting and changing a size from 9-way set-associative cache memory to 7-way set-associative cache memory when defective cells are present in 2 tag memories and 2 data memories, respectively. FIG. 9B, as illustrated in FIG. 9A, shows a program state of each of the fuses F1-F3 of the fuse decoders 200 a-200 i, states of the decoding signals D1-D6 thereof, and a selected input terminal of each of way selection signal generators 100 a-100 i when the 9-way cache memory is changed to operate as a 7-way cache memory.

[0078] Referring to FIGS. 9A and 9B, when there are present defective cells in each of 2 tag memories 30 d and 30 e and 2 data memories 40 b and 40 g, the fuses F1, F2, and F3 are programmed in the fuse decoders 200 a-200 i so as not to use the tag memories 30 d and 30 e and the data memories 40 b and 40 g with defective cells. If the fuse decoders 200 a-200 i are programmed as illustrated in FIG. 9B, the way selection signal generator 100 a outputs as a way selection signal WSELa the hit signal HITa input via the input terminal IN1, the way selection signal generator 100 c outputs as a way selection signal WSELc the hit signal HITb input via the input terminal IN3, the way selection signal generator 100 d outputs as a way selection signal WSELd the hit signal HITc input via the input terminal IN4, the way selection signal generator 100 e outputs as a way selection signal WSELe the hit signal HITi input via the input terminal IN6, the way selection signal generator 100 f outputs as a way selection signal WSELf the hit signal HITf input via the input terminal IN1, the way selection signal generator 100 h outputs as a way selection signal WSELh the hit signal HITh input via the input terminal IN1, and the way selection signal generator 100 i outputs as a way selection signal WSELi the hit signal HITg input via the input terminal IN5. Meanwhile, the way selection signal generator 100 b and the way selection signal generator 100 g receive none of signals input via the input terminals IN1-IN6 and way selection signals WSELb and WSELg are therefore generated at a low level, respectively. Therefore, the tag memories 30 d and 30 e and the data memories 40 b and 40 g having defective cells are not used.

[0079] In the cache memory 1000 having the foregoing configuration, for example, when the comparator 50 b determines that the contents stored in the tag memory 30 b are identical with the tag address 11 and the hit signal HITb is output at a high level, a way selection signal WSELc is generated by the way selection signal generator 100 c. Thus, the output selection circuit 62 outputs data DATAc from the data memory 40 c to the CPU 2.

[0080] In another example, if the comparator 50 i determines that the contents stored in the tag memory 30 i are identical with the tag address 11 and a hit signal HITi is output at a high level, the way selection signal WSELe is generated by the way selection signal generator 100 e. As a result, the output selection circuit 62 outputs data DATAe from the data memory 40 e to the CPU 2.

[0081] According to the present invention, among the tag memories 30 a-30 i and the data memories 40 a-40 i, the remaining tag memories 30 a-30 c and 30 f-30 i and data memories 40 a, 40 c-40 f, 40 h, and 40 i excluding the tag memories 30 d and 30 e and data memories 40 b and 40 g with defective cells are used to embody a cache memory of which size is scaled down and may be normally operated.

[0082]FIG. 10A exemplarily illustrates a method for selecting and changing a size from 9-way set-associative cache memory to 4-way set-associative cache memory when it is determined that defective cells are present in 5 tag memories and 5 data memories, respectively. FIG. 10B, as illustrated in FIG. 10A, shows a program state of each of the fuses F1-F3 of the fuse decoders 200 a-200 i, states of the decoding signals D1-D6 thereof, and a selected input terminal of each of way selection signal generators 100 a-100 i when the 9-way cache memory is changed to the 4-way cache memory.

[0083] Referring to FIGS. 10A and 10B, when defective cells are present in each of the 5 tag memories 30 a, 30 c, 30 f, 30 g, and 30 h and 5 data memories 40 c, 40 d, 40 e, 40 h, and 40 i, fuses F1, F2, and F3 in the fuse decoders 200 a-200 i are programmed so as not to use the tag memories 30 a, 30 c, 30 f, 30 g, and 30 h and data memories 40 c, 40 d, 40 e, 40 h, and 40 i having defective cells. If the fuse decoders 200 a-200 i are programmed as illustrated in FIG. 10B, the way selection signal generator 100 a outputs as a way selection signal WSELa the hit signal HITi input via the input terminal IN6, the way selection signal generator 100 b outputs as a way selection signal WSELb the hit signal HITB input via the input terminal IN1, the way selection signal generator 100 f outputs as a way selection signal WSELf the hit signal HITd input via the input terminal IN1, and the way selection signal generator 100 g outputs as a way selection signal WSELg the hit signal HITe input via the input terminal IN1. Meanwhile, the way selection signal generators 100 c, 100 d, 100 e, 100 h, and 100 i, which correspond to the data memories 40 c, 40 d, 40 e, 40 h, and 40 i with defective memory cells, receive none of signals input via the input terminals IN1-IN6. According to the foregoing configuration, the tag memories 30 a, 30 c, 30 f, 30 g, and 30 h and the data memories 40 c, 40 d, 40 e, 40 h, and 40 i having defective cells are not used.

[0084] In the cache memory 1000 having the foregoing configuration, for example, when the comparator 50 d determines that the contents stored in the tag memory 30 d are identical with the tag address 11 and the hit signal HITd is output at a high level, a way selection signal WSELf is generated by the way selection signal generator 10 f. Thus, the output selection circuit 62 outputs data DATAf from the data memory 40 f to the CPU 2.

[0085] In another example, if the comparator 50 i determines that the contents stored in the tag memory 30 i are identical with the tag address 11 and a hit signal HITi is output at a high level, the way selection signal WSELa is generated by the way selection signal generator 100 a. As a result, the output selection circuit 62 outputs data DATAa from the data memory 40 a to the CPU 2.

[0086] According to the present invention, among the tag memories 30 a-30 i and the data memories 40 a-40 i, the remaining tag memories 30 b, 30 d, 30 e, and 30 i and data memories 40 a, 40 b, 40 f, and 40 g excluding the tag memories 30 a, 30 c, 30 f, 30 g, and 30 h and data memories 40 c, 40 d, 40 e, 40 h, and 40 i with defective cells are used to embody a cache memory of which size is scaled down and may be normally operated.

[0087] If 3 tag memories of the tag memories 30 a-30 i have defective cells and 1 data memory of the data memories 40 a-40 i have defective cells, because normal tag memories and data memories should one-to-one correspond to each other, two of the normal data memories would no be used. That is, 6 tag memories and 6 data memories without defective cells should correspond to each other on a one-to-one basis.

[0088] While the present preferred embodiment has been illustrated and described in connection with 9-way set-associative cache memory 1000, it is capable of application to multi-way set-associative cache memory and of various changes in the least way number as would be apparent to those skilled in the art. As set forth above, the number of input terminals of way selection signal generators is determined by the greatest way number and the least way number of the cache memory. Therefore, the scope of the appended claims, which define the invention, should be accorded the broadest interpretation so as to encompass all such modifications and similar structures.

[0089] According to the present invention as described above, when there are present incurably defective cells in tag and data memories of a multi-way set-associative cache memory, those normally operational ways of the tag and data memories are selected and used, while excluding the ways of the tag and data memories with defective cells. By changing to a small-size cache memory, it is capable of preventing scraping or discarding of the entire high-priced processor chip in which CPU and a cache memory are integrated in a single chip due to several defective cells of the cache memory.

[0090] While this invention has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made herein without departing from the spirit and scope of the invention as defined by the appended claims. 

What is claimed is:
 1. A data processing system comprising: a processor; and a multi-way set-associative cache memory for storing data to be used by the processor, wherein the cache memory comprises: a data memory being divided into a plurality of ways, the data memory for storing data to be used by the processor; a tag memory being divided into a plurality of ways, the tag memory for storing a tag address; and a cache size selector for selecting for operation those ways among the plurality of ways of the data memory and tag memory that are determined to function normally, and to exclude from operation those ways among the plurality of ways of the data memory and tag memory having defective memory cells, the number of selected ways of data memory being equal to the number of selected ways of tag memory.
 2. The data processing system as claimed in claim 1, further comprising comparing means for respectively comparing a predetermined address from the processor with tag addresses stored in the selected ways of the tag memory to output hit signals that respectively represent whether or not the predetermined address is consistent with the tag address stored in each way of the tag memory, wherein the cache size selector receives the hit signals from the selected ways of the tag memory and corresponds the hit signals to the selected ways of the data memory.
 3. The data processing system as claimed in claim 2, wherein the cache size selector comprises: a first selection circuit for receiving the hit signals corresponding to the selected ways of the tag memory and for outputting a plurality of selection signals corresponding respectively to ways of the data memory, wherein the selection signals select one of the selected ways of the data memory; and a second selection circuit for supplying the processor with the data stored in one of the ways of the data memory according to the selection signals.
 4. The data processing system as claimed in claim 3, wherein the second selection circuit supplies the processor with none of the data stored in the data memory when all the hit signals indicate that the predetermined address is not consistent with the tag address stored in a corresponding way of the tag memory.
 5. The data processing system as claimed in claim 3, wherein the first selection circuit comprises a plurality of selection signal generating circuits corresponding respectively to ways of the data memory, the selection signal generating circuits for selectively receiving one of the hit signals corresponding to the selected ways of the tag memory and for outputting the selected signal for selecting a way corresponding to the data memory.
 6. The data processing system as claimed in claim 5, wherein each of the selection signal generating circuits selectively receives one of the hit signals corresponding to the selected ways of the tag memory when a corresponding way of the data memory is selected, and each of the selection signal generating circuits receives none of the hit signals and does not output the selection signal when the corresponding way of the data memory is not selected.
 7. The data processing system as claimed in claim 5, wherein each of the selection signal generating circuits receives a different hit signal.
 8. The data processing system as claimed in claim 5, wherein each of the selection signal generating circuits comprises: input terminals for receiving the hit signals corresponding to the selected ways of the tag memory; storing means for storing information as to whether one of or none of the hit signals are received from the comparing means; a decoder for decoding the information stored in the storing means to output decoding signals; and a selection signal generator for receiving one of the hit signals input via the input terminals to output the selected signal or for receiving none of the hit signals such that the selected signal is not output, in response to the decoding signals.
 9. The data processing system as claimed in claim 8, wherein the storing means comprises at least one fuse.
 10. The data processing system as claimed in claim 10, wherein the number of the input terminals is a number obtained by adding 1 to a difference between the maximum selectable way number and the minimum selectable way number of the data and tag memories.
 11. A data processing system comprising: a processor; and a multi-way set-associative cache memory for storing data to be, used by the processor, wherein the cache memory comprises: a data memory being divided into a plurality of ways, the data memory for storing data to be used by the processor; a tag memory being divided into a plurality of ways, the tag memory for storing a tag address; comparing means for respectively comparing a predetermined address from the processor with tag addresses stored in ways of the tag memory and for outputting hit signals that respectively represent whether or not the predetermined address is identical with the tag address stored in each way of the tag memory; and a cache memory size selection circuit for selecting for operation the hit signals corresponding to a portion of the ways of the tag memory and a portion of the ways of the data memory, the number of selected hit signals being equal to the number of selected ways of the data memory.
 12. The data processing system as claimed in claim 11, wherein the cache memory size selection circuit respectively selects for operation those ways among the plurality of ways of the data memory and the tag memory that are determined to function normally, and excludes from operation those ways among the plurality of ways of the data memory and the tag memory having defective memory cells.
 13. The data processing system as claimed in claim 12, wherein the cache memory size selection circuit further comprises: a plurality of selection signal generating circuits corresponding respectively to the ways of the data memory, the selection signal generating circuits each receiving one of the hit signals corresponding to the normally functioning ways of the tag memory to output a selection signal for selecting a way corresponding respectively to the data memory; and an output circuit for supplying the processor with the data stored in the way of the data memory selected by the selection signals.
 14. The data processing system as claimed in claim 13, wherein the output circuit supplies the processor with none of data stored in the data memory when all the hit signals indicate that the predetermined address is not identical with the tag address stored in the way corresponding to the tag memory.
 15. The data processing system as claimed in claim 13, wherein each of the selection signal generating circuits receives one of the hit signals corresponding to the selected ways of the tag memory when the way corresponding to the data memory is selected, and each of the selection signal generating circuits receives none of the hit signals and does not output the selection signal when the way corresponding to the data memory is not selected.
 16. The data processing system as claimed in claim 13, wherein each of the selection signal generating circuits receives a different hit signal.
 17. The data processing system as claimed in claim 13, wherein each of the selection signal generating circuits comprises: input terminals for receiving the hit signals corresponding to the selected ways of the tag memory; storing means for storing information as to whether one of the hit signals is received from the comparing means; a decoder for decoding the information stored in the storing means to output decoding signals; and a selection signal generator for selecting one of the hit signals input via the input terminals to be output as the selection signal or for selecting none of the hit signals such that the selection signal is not output, in response to the decoding signals.
 18. The data processing system as claimed in claim 17, wherein the storing means comprises at least one fuse.
 19. The data processing system as claimed in claim 17, wherein the number of the input terminals is a number obtained by adding 1 to a difference between the maximum selectable way number and the minimum selectable way number of the data and tag memories.
 20. A multi-way set-associative cache memory comprising: a data memory being divided into a plurality of ways, the data memory for storing data to be used by the processor; a tag memory being divided into a plurality of ways, the tag memory for storing a tag address; and a cache size selector for selecting for operation those ways among the plurality of ways of the data memory and the tag memory that are determined to function normally, and to exclude from operation those ways among the plurality of ways of the data memory and the tag memory having defective memory cells, the number of selected ways of data memory being equal to the number of selected ways of tag memory.
 21. The multi-way set-associative cache memory as claimed in claim 20, further comprising comparing means for respectively comparing a predetermined address from the processor with tag addresses stored in the selected ways of the tag memory to output hit signals that respectively represent whether or not the predetermined address is identical with the tag address stored in each way of the tag memory, wherein the cache size selector receives the hit signals from the selected ways of the tag memory and corresponds the hit signals to the selected ways of the tag memory.
 22. The multi-way set-associative cache memory as claimed in claim 21, wherein the cache size selector comprises: a first selection circuit for receiving the hit signals corresponding to the selected ways of the tag memory and for outputting a plurality of selection signals corresponding respectively to the ways of the data memory, wherein the selection signals select one of the selected ways of the data memory; and a second selection circuit for supplying the processor with the data stored in one of the ways of the data memory according to the selection signals.
 23. The multi-way set-associative cache memory as claimed in claim 22, wherein the second selection circuit supplies the processor with none of the data stored in the data memory when all the hit signals indicate that the predetermined address is not identical with the tag address stored in the way corresponding to the tag memory.
 24. The multi-way set-associative cache memory as claimed in claim 22, wherein the first selection circuit comprises a plurality of selection signal generating circuits corresponding respectively to the ways of the data memory, the plurality of the selection signal generating circuits each selectively receiving one of the hit signals corresponding to the selected ways of the tag memory and for outputting the selection signals for selecting the way corresponding to the data memory.
 25. The multi-way set-associative cache memory as claimed in claim 24, wherein each of the selection signal generating circuits receives one of the hit signals corresponding to the selected ways of the tag memory when the way corresponding to the data memory is selected, and each of the selection signal generating circuits receives none of the hit signals and does not output the selection signal when the way corresponding to the data memory is not selected.
 26. The multi-way set-associative cache memory as claimed in claim 24, wherein each of the selection signal generating circuits receives a different hit signal.
 27. The multi-way set-associative cache memory as claimed in claim 24, wherein each of the selection signal generating circuits comprises: input terminals for receiving the hit signals corresponding to the selected ways of the tag memory; storing means for storing the information as to whether one of the hit signals is received from the comparing means; a decoder for decoding the information stored in the storing means to output decoding signals; and a selection signal generator for selecting one of the hit signals input via the input terminals to output as the selection signal or for selecting none of the hit signals to be output as the selection signal, in response to the decoding signals.
 28. The multi-way set-associative cache memory as claimed in claim 27, wherein the storing means comprises at least one fuse.
 29. The multi-way set-associative cache memory as claimed in claim 27, wherein the number of the input terminals is a number obtained by adding 1 to a difference between the maximum selectable way number and the minimum selectable way number of the data and tag memories.
 30. A multi-way set-associative cache memory comprising: a data memory being divided into a plurality of ways, the data memory for storing data to be used by a processor; a tag memory being divided into a plurality of ways, the tag memory for storing a tag address; comparing means for respectively comparing a predetermined address from the processor with tag addresses stored in ways of the tag memory to output hit signals respectively representing whether or not the predetermined address is identical with the tag address stored in each way of the tag memory; and a size selection circuit for selecting for operation the hit signals corresponding to a portion of the ways of the tag memory and a portion of the ways of the data memory, the number of selected hit signals being equal to the number of selected ways of the data memory.
 31. The multi-way set-associative cache memory as claimed in claim 30, wherein the size selection circuit further comprises an output circuit for supplying the processor with data stored in a way corresponding to the data memory when one of the hit signals indicates that the tag address stored in the way corresponding to the tag memory is identical with the predetermined address.
 32. The multi-way set-associative cache memory as claimed in claim 31, wherein the size selection circuit comprises: a plurality of selection signal generating circuits corresponding respectively to the ways of the data memory, the selection signal generating circuits each receiving one of the hit signals corresponding to normally functioning ways of the tag memory to output a selection signal for selecting a way corresponding respectively to the data memory; and an output circuit for supplying the processor with the data stored in the way of the data memory selected by the selection signal.
 33. The multi-way set-associative cache memory as claimed in claim 32, wherein each of the selection signal generating circuits outputs the selection signal such that the output selection circuit supplies the processor with none of the data stored in the data memory when all the hit signals indicate that the predetermined address is not identical with the tag address stored in the way corresponding to the tag memory.
 34. The multi-way set-associative cache memory as claimed in claim 32, wherein each of the selection signal generating circuits receives one of the hit signals corresponding to the selected ways of the tag memory when the way corresponding to the data memory is selected, and each of the selection signal generating circuits receives none of the hit signals and does not output the selection signal when the way corresponding to the data memory is not selected.
 35. The multi-way set-associative cache memory as claimed in claim 32, wherein each of the selection signal generating circuits receives a different hit signal.
 36. The multi-way set-associative cache memory as claimed in claim 35, wherein each of the selection signal generating circuits comprises: input terminals for receiving the hit signals corresponding to the selected ways of the tag memory; storing means for storing information as to whether one of the hit signals is received from the comparing means; a decoder for decoding the information stored in the storing means to output decoding signals; and a selection signal generator for selecting one of the hit signals input via the input terminals to be output as the selection signal or for selecting none of the hit signals such that the selection signal is not output, in response to the decoding signals.
 37. The multi-way set-associative cache memory as claimed in claim 36, wherein the storing means comprises at least one fuse.
 38. The multi-way set-associative cache memory as claimed in claim 36, wherein the number of the input terminals is a number obtained by adding 1 to a difference between the maximum selectable way number and the minimum selectable way number of the data and tag memories. 